From f861e6a269ba9f62700776d3cd13b644a9e836d4 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 20 Sep 2023 16:38:54 +0200
Subject: refactor: use named export for everything except pages

Next expect a default export for pages so only those components should
use default exports. Everything else should use named exports to
reduce the number of import statements.
---
 src/pages/sujet/[slug].tsx | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

(limited to 'src/pages/sujet/[slug].tsx')

diff --git a/src/pages/sujet/[slug].tsx b/src/pages/sujet/[slug].tsx
index ffde92d..6308978 100644
--- a/src/pages/sujet/[slug].tsx
+++ b/src/pages/sujet/[slug].tsx
@@ -4,39 +4,37 @@ import { useRouter } from 'next/router';
 import Script from 'next/script';
 import { ParsedUrlQuery } from 'querystring';
 import { useIntl } from 'react-intl';
-import Heading from '../../components/atoms/headings/heading';
-import ResponsiveImage from '../../components/molecules/images/responsive-image';
-import PostsList from '../../components/organisms/layout/posts-list';
-import LinksListWidget from '../../components/organisms/widgets/links-list-widget';
-import { getLayout } from '../../components/templates/layout/layout';
-import PageLayout, {
+import {
+  getLayout,
+  Heading,
+  LinksListWidget,
+  PageLayout,
   type PageLayoutProps,
-} from '../../components/templates/page/page-layout';
+  PostsList,
+  ResponsiveImage,
+} from '../../components';
 import {
   getAllTopicsSlugs,
   getTopicBySlug,
   getTopicsPreview,
   getTotalTopics,
-} from '../../services/graphql/topics';
+} from '../../services/graphql';
 import styles from '../../styles/pages/topic.module.scss';
 import {
   type NextPageWithLayout,
   type PageLink,
   type Topic,
-} from '../../types/app';
-import { loadTranslation, type Messages } from '../../utils/helpers/i18n';
+} from '../../types';
 import {
   getLinksListItems,
   getPageLinkFromRawData,
   getPostsWithUrl,
-} from '../../utils/helpers/pages';
-import {
   getSchemaJson,
   getSinglePageSchema,
   getWebPageSchema,
-} from '../../utils/helpers/schema-org';
-import useBreadcrumb from '../../utils/hooks/use-breadcrumb';
-import useSettings from '../../utils/hooks/use-settings';
+} from '../../utils/helpers';
+import { loadTranslation, type Messages } from '../../utils/helpers/server';
+import { useBreadcrumb, useSettings } from '../../utils/hooks';
 
 export type TopicPageProps = {
   currentTopic: Topic;
-- 
cgit v1.2.3

